package com.dream.inspect.modules.business.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.dream.inspect.modules.business.entity.SuperviseRecordEntity;
import com.dream.inspect.modules.dream.pojo.SuperviseRecordFormMap;

/**
 * 督察记录表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-06-16 17:04:52
 */
public interface SuperviseRecordDao extends BaseMapper<SuperviseRecordEntity> {
	List<SuperviseRecordEntity> findSuperviseRecordList(@Param("ew") Wrapper<SuperviseRecordEntity> wrapper, 
			@Param("currPage") int currPage,
            @Param("pageSize") int pageSize);
	
	int findSuperviseRecordListCount(
			@Param("ew") Wrapper<SuperviseRecordEntity> wrapper);
	
	SuperviseRecordEntity findSuperviseRecordById(@Param("ew") Wrapper<SuperviseRecordEntity> wrapper);

	public List<SuperviseRecordFormMap> findBackupList(@Param("map")Map<String ,Object> map, Page<SuperviseRecordFormMap> page);
	void delBackupDatas(@Param("userId") String userId,
						@Param("rId") String rId,
						@Param("flag") String flag);

	Map<String,Object> getRecordByBackuoId(@Param("userId") String userId, @Param("rId") String rId);
	int checkSuperviseRecordCount(@Param("ew") Wrapper<SuperviseRecordEntity> wrapper);
	
	int selectThisMonthCount(@Param("ew") Wrapper<SuperviseRecordEntity> wrapper);

	List<SuperviseRecordFormMap> findSuperviseRecordByProjectId(@Param("map")Map<String ,Object> map);
	
	SuperviseRecordEntity findSuperviseRecordForSearchPage(@Param("id") String id);
	
	int findSuperviseRecordForSearchPageCount(@Param("ew") Wrapper<SuperviseRecordEntity> wrapper);
	
	List<SuperviseRecordEntity> selectSuperviseRecordListPage(Pagination page ,@Param("srEntity") SuperviseRecordEntity srEntity);
	
	SuperviseRecordEntity selectSuperviseRecordByIdDetail(@Param("srEntity") SuperviseRecordEntity srEntity);
}
